package priv.mill.jdbc.dao;

import java.util.List;

import priv.mill.jdbc.JdbcTest;
import priv.mill.model.dept;

public class DeptDao implements IDao<dept>{

	@Override
	public List<dept> findAll(String sql, Object... args) throws Exception {
		return JdbcTest.query(sql, dept.class, args);
	}

	@Override
	public dept findOne(String sql, Object... args) throws Exception {
		List<dept> query = JdbcTest.query(sql, dept.class, args);
		if(query==null||query.size()==0)return null;
		return query.get(0);
	}

	@Override
	public Boolean delete(String sql, Object... args) throws Exception {
		return JdbcTest.update(sql, args);
	}

	@Override
	public Boolean update(String sql, Object... args) throws Exception {
		return JdbcTest.update(sql, args);
	}

	@Override
	public Boolean insert(String sql, Object... args) throws Exception {
		return JdbcTest.update(sql, args);
	}

	
	
}
